// void, Obj this
Hero h;
point dpt;

h =  this.AsHero;
// nie wpisywac sleep wywala blad 00000000
if(h.HasArmy){
	if(cmdparam == "LongLine"){
		if (h.race==Carthage || h.race==Egypt)
			h.PlaySound("data/Sound Entities/VOICELLARAB.XML");
		else if(h.race==ImperialRome || h.race==RepublicanRome)
			h.PlaySound("data/Sound Entities/VOICELLROMAN.XML");
		else if(h.race==Gaul || h.race==Iberia || h.race==Britain || h.race==Germany)        
			h.PlaySound("data/Sound Entities/VOICELLBARB.XML");
	} else if(cmdparam == "Line"){
		if (h.race==Carthage || h.race==Egypt)
			h.PlaySound("data/Sound Entities/VOICELineARAB.XML");
		else if(h.race==ImperialRome || h.race==RepublicanRome)
			h.PlaySound("data/Sound Entities/VOICELineROMAN.XML");
		else if(h.race==Gaul || h.race==Iberia || h.race==Britain || h.race==Germany)        
			h.PlaySound("data/Sound Entities/VOICELineBARB.XML");
	} else if(cmdparam == "Front"){
		if (h.race==Carthage || h.race==Egypt)
			h.PlaySound("data/Sound Entities/VOICEFrontARAB.XML");
		else if(h.race==ImperialRome || h.race==RepublicanRome)
			h.PlaySound("data/Sound Entities/VOICEFrontROMAN.XML");
		else if(h.race==Gaul || h.race==Iberia || h.race==Britain || h.race==Germany)        
			h.PlaySound("data/Sound Entities/VOICEFrontBARB.XML");
	} else if(cmdparam == "Loose"){
		if (h.race==Carthage || h.race==Egypt)
			h.PlaySound("data/Sound Entities/VOICELooseARAB.XML");
		else if(h.race==ImperialRome || h.race==RepublicanRome)
			h.PlaySound("data/Sound Entities/VOICELooseROMAN.XML");
		else if(h.race==Gaul || h.race==Iberia || h.race==Britain || h.race==Germany)        
			h.PlaySound("data/Sound Entities/VOICELooseBARB.XML");
	} else if(cmdparam == "Square"){
		if (h.race==Carthage || h.race==Egypt)
			h.PlaySound("data/Sound Entities/VOICESquareARAB.XML");
		else if(h.race==ImperialRome || h.race==RepublicanRome)
			h.PlaySound("data/Sound Entities/VOICESquareROMAN.XML");
		else if(h.race==Gaul || h.race==Iberia || h.race==Britain || h.race==Germany)        
			h.PlaySound("data/Sound Entities/VOICESquareBARB.XML");
	}
}
h.SetFormation(cmdparam);
if(!h.InHolder){
	if(.command == "stand_position" || .command == "idle"){
		dpt = GetVecByDir(h.GetDir(), 50);
		h.FormSetupAndMoveTo(h.pos+dpt, 0, 0, true);
	}
}
